package cn.elves.model.auth.entity.dto;

import cn.elves.model.auth.entity.po.Menu;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 *
 * @TableName tb_menu
 */
@TableName(value ="tb_menu")
@Data
public class MenuDTO implements Serializable {
    /**
     *
     */

    private Long id;

    /**
     *
     */
    private Long parentId;

    /**
     *
     */
    private Integer category;

    /**
     *
     */
    private Long sortNum;

    /**
     *
     */
    private String icon;

    /**
     *
     */
    private String href;

    /**
     *
     */
    private String description;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;




    public Menu toMenu(){
        Menu menu = new Menu();
        BeanUtils.copyProperties(this,menu);
        return menu;
    }
}
